<?
if (is_object($this->form) && $this->form instanceof WebVista_Form):
	echo $this->form->renderOpen();
	$fields = $this->ormObject->ormFields();
	foreach ($fields as $field):
		if (!is_object($this->ormObject->$field)):
			$input = "{$field}Input";
			if (in_array($field,$this->ormObject->_primaryKeys)):
				echo $this->form->$input("FormHidden");
			else:
				echo $this->form->$field->renderLabel();
				echo $this->form->$input();
			endif;
		endif;
	endforeach;
?>
	<br /><br/>
	<?=$this->form->okInput()?>
	<input type="button" value="Cancel" onClick="dhxWins.window('windowEditORMObjectId').close()" />

	<?=$this->form->renderClose()?>

	<script>
	function postSubmiteditobject() {
		dhxWins.window('windowEditORMObjectId').close();
		return false;
	}
	</script>
<?
else:
	echo $this->form;
endif;
?>
